<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link type="text/css" rel="stylesheet" href="app://static/css/main.css" />
		<link type="text/css" rel="stylesheet" href="app://static/jquery/css/ui-lightness/jquery-ui.custom.css" />
		<script type="text/javascript" src="app://static/jquery/js/jquery.min.js"></script>
		<script type="text/javascript" src="app://static/jquery/js/jquery-ui.custom.min.js"></script>
		<script type="text/javascript" src="app://static/jquery/jquery.hoveraccordion.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				var win = Titanium.UI.currentWindow;
				$('#sidenav').hoverAccordion({
					keepHeight : true, 
					activateItem: 2, 
				});
				
				// Bind event on submenu
				$('.sub_menu').bind('click', function(){
					$("#mainframe").attr("src",'modules/'+this.id+'.html')
				});
				
				// resize iframe
				$('#mainframe').width($('#content').width() - $('#sidebar').width());
				$('#mainframe').height($('#content').height());
				$(window).resize(function() {
					$('#mainframe').width($('#content').width() - $('#sidebar').width());
					$('#mainframe').height($('#content').height());
				});
			});
		</script>
	</head>
	<body style="margin:0">
		<div id="header">This is the header</div>
		<div id="content">
			<div id="sidebar">
				<ul id="sidenav">
					<li><a id="m_member" href="javascript:void(0)">会员管理</a>
						<ul>
							<li><a class="sub_menu" id="m_newmember" href="javascript:void(0)">新增会员</a></li>
							<li><a class="sub_menu" id="m_listmember" href="javascript:void(0)">会员列表</a></li>
						</ul>
					</li>
					<li><a id="m_business" href="javascript:void(0)">经营管理</a>
						<ul>
							<li><a class="sub_menu" id="m_sale" href="javascript:void(0)">出售商品</a></li>
							<li><a class="sub_menu" id="m_salelist" href="javascript:void(0)">销售查询</a></li>
							<li><a class="sub_menu" id="m_product" href="javascript:void(0)">商品管理</a></li>
						</ul>
					</li>
					<li><a id="m_analysis" href="javascript:void(0)">智能分析</a>
						<ul>
							<li><a class="sub_menu" id="m_saleanalysis" href="javascript:void(0)">销售分析</a></li>
							<li><a class="sub_menu" id="m_productanalysis" href="javascript:void(0)">商品分析</a></li>
						</ul>
					</li>
				</ul>
			</div>
			<iframe id="mainframe" src="app://modules/default_page.html" style="width: 100%;"  frameborder="0" scrolling="no" marginwidth="0" marginheight="0" onload="" ></iframe>
		</div>
	</body>
</html>